package edu.tjufe.llp.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import edu.tjufe.llp.entity.ChargeArea;
import edu.tjufe.llp.entity.Station;
import org.apache.ibatis.annotations.Param;

/**
 * 充电桩Mapper接口
 *
 * @author leiliping
 * @date 2022-12-24
 */
public interface StationMapper extends BaseMapper<Station>
{
    /**
     * 查询充电桩
     *
     * @param stationId 充电桩主键
     * @return 充电桩
     */
    public Station selectStationByStationId(Integer stationId);

    /**
     * 查询充电桩列表
     *
     * @param station 充电桩
     * @return 充电桩集合
     */
    public List<Station> selectStationList(Station station);

    /**
     * 新增充电桩
     *
     * @param station 充电桩
     * @return 结果
     */
    public int insertStation(Station station);

    /**
     * 修改充电桩
     *
     * @param station 充电桩
     * @return 结果
     */
    public int updateStation(Station station);

    /**
     * 删除充电桩
     *
     * @param stationId 充电桩主键
     * @return 结果
     */
    public int deleteStationByStationId(Integer stationId);

    /**
     * 批量删除充电桩
     *
     * @param stationIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStationByStationIds(Integer[] stationIds);

    Page<Station> findPage(Page<Station> page, @Param("stationCode")
    String stationCode,@Param("areaId") Integer areaId,@Param("state") String state);

}